<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>深的个人博客</title>
    <%- include("link")%>

</head>

<body>
    <div id="container">
        
        <%- include("nav")%>
        <div id="content">
            <div class="conleft">
               <%- include("left")%>
                
                
            </div>
            <div class="conright">

                <%articel.forEach(item=>{%>

                    <div class="articelbox" data-href="/articel/Info/<%=item._id%>">

                        <div class="arinfo">
                            <div class="artitle">
                                <h1><%=item.title%></h1>
                                <span>作者:<%=item.author.userName%></span>
                                <span>发表时间:<%=item.date.toLocaleDateString()%></span>
                                <span>浏览量：<%=item.views%></span>
                                <span class="views">标签：
                                    <%item.category.forEach(cate=>{%>
                                    <i><%=cate%></i>
                                    <%})%>
                                </span>
                            </div>
                            <div class="mcinfo">
                                <%=item.Introduction%>
                            </div>
                        </div>
                        <div class="titlephoto">
                            <%if(item.background){%>
                                <%- item.background%>
                                <span style="display: none;">/photo/<%=item.author.photo%></span>

                            <%}else{%>

                                <img class="titleimg" src="/photo/<%=item.author.photo%>" alt="">
                                <span style="display: none;">/photo/<%=item.author.photo%></span>

                            <%}%>
                        </div>
                        </div>
                    
                <%})%>
                <div class="paging">
                    <a href="/main/<%=page-1%>" class="layui-btn">上一页</a>
                    <span>
                        <i><%=page%></i>
                        <i>/</i>
                        <i><%=maxpage%></i>
                    </span>
                    <a href="/main/<%=page+1%>" class="layui-btn">下一页</a>
                    </div>
                </div>
                
        </div>
        <div class="gotop">
            <img src="/img/top.png" alt="">
        </div>
        <%- include("mask")%>
        <%- include("search")%>
        
    </div>

</body>
<script src="/js/includ.js"></script>
<script src="/js/main.js"></script>

</html>